import request from '@/utils/request'

// 查询证书列表
export function listCertificate(query) {
  return request({
    url: '/iot/certificate/list',
    method: 'get',
    params: query
  })
}

// 查询证书（无分页）
export function queryCertificate(query) {
  return request({
    url: '/iot/certificate/query',
    method: 'get',
    params: query
  })
}

// 查询详情
export function getCertificate(id) {
  return request({
    url: '/iot/certificate/' + id,
    method: 'get'
  })
}

// 新增证书
export function addCertificate(data) {
  return request({
    url: '/iot/certificate',
    method: 'post',
    data: data
  })
}

// 修改证书
export function editCertificate(data) {
  return request({
    url: '/iot/certificate',
    method: 'put',
    data: data
  })
}

// 删除证书
export function removeCertificate(id) {
  return request({
    url: '/iot/certificate/' + id,
    method: 'delete'
  })
}
